<template>
  <ul>
    // eslint-disable-next-line vue/require-v-for-key
    <p class="first-p">{{ name }}</p>
    <li
      v-for="todo in filteredTodos"
      v-bind:key="todo.id"
      >
      <slot name="todo" v-bind:todo="todo">
        {{ todo.text }}
      </slot>
    </li>
  </ul>
<!--   <todo-list v-bind:todos="todos">
  <template v-slot:todo="{ todo }">
    <span v-if="todo.isComplete">✓</span>
    {{ todo.text }}
  </template>
</todo-list>

<todo-list v-bind:todos="todos">
  <template slot="todo" slot-scope="{ todo }">
    <span v-if="todo.isComplete">✓</span>
    {{ todo.text }}
  </template>
</todo-list> -->
</template>

<script>
export default {
  name: 'TodoList',
  data () {
    return {
      name: '123'
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
